diff --git a/board/emk/top860/Makefile b/board/emk/top860/Makefile
index ef173d0..13ce9fc 100644
--- a/board/emk/top860/Makefile
+++ b/board/emk/top860/Makefile
@@ -28,7 +28,7 @@
 OBJS	= $(BOARD).o flash.o
 
 $(LIB):	.depend $(OBJS)
-	$(AR) crv $@ $^
+	$(AR) crv $@ $(OBJS)
 
 #########################################################################
 
diff --git a/board/emk/top860/flash.c b/board/emk/top860/flash.c
index a9a9771..0f827df 100644
--- a/board/emk/top860/flash.c
+++ b/board/emk/top860/flash.c
@@ -2,11 +2,11 @@
  * (C) Copyright 2003
  * EMK Elektronik GmbH <www.emk-elektronik.de>
  * Reinhard Meyer <r.meyer@emk-elektronik.de>
- *
- * copied from the BMW Port - seems that its similiar enough
- * to be easily adaped ;) --- Well, it turned out to become a
- * merger between parts of the EMKstax Flash routines and the
- * BMW funtion frames...
+ *
+ * copied from the BMW Port - seems that its similiar enough
+ * to be easily adaped ;) --- Well, it turned out to become a
+ * merger between parts of the EMKstax Flash routines and the
+ * BMW funtion frames...
  *
  * (C) Copyright 2000
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
@@ -34,457 +34,456 @@
 #include <mpc8xx.h>
 
 #define	FLASH_WORD_SIZE		unsigned short
-#define FLASH_WORD_WIDTH	(sizeof (FLASH_WORD_SIZE))
-
+#define FLASH_WORD_WIDTH	(sizeof (FLASH_WORD_SIZE))
+
 flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips    */
-
+
 /*-----------------------------------------------------------------------
  * Functions
  */
 static int write_word (flash_info_t *info, ulong dest, ulong data);
 
 
-/*****************************************************************************
- * software product ID entry/exit
- *****************************************************************************/
-static void FlashProductIdMode (
-	volatile FLASH_WORD_SIZE *b,
-	int on_off)
-{
-	b[0x5555] = 0xaa;
-	b[0x2aaa] = 0x55;
-	b[0x5555] = on_off ? 0x90 : 0xf0;
-}
-
-/*****************************************************************************
- * sector erase start
- *****************************************************************************/
-static void FlashSectorErase (
-	volatile FLASH_WORD_SIZE *b,
-	volatile FLASH_WORD_SIZE *a)
-{
-	b[0x5555] = 0xaa;
-	b[0x2aaa] = 0x55;
-	b[0x5555] = 0x80;
-	b[0x5555] = 0xaa;
-	b[0x2aaa] = 0x55;
-	a[0] = 0x30;
-}
-
-/*****************************************************************************
- * program a word
- *****************************************************************************/
-static void FlashProgWord (
-	volatile FLASH_WORD_SIZE *b,
-	volatile FLASH_WORD_SIZE *a,
-	FLASH_WORD_SIZE v)
-{
-	b[0x5555] = 0xaa;
-	b[0x2aaa] = 0x55;
-	b[0x5555] = 0xa0;
-	a[0] = v;
-}
-
-/*****************************************************************************
- * reset bank, back to read mode
- *****************************************************************************/
-static void FlashReset (volatile FLASH_WORD_SIZE *b)
-{
-	b[0] = 0xf0;
-}
-
-/*****************************************************************************
- * identify FLASH chip
- * this code is a stripped version of the FlashGetType() function in EMKstax
- *****************************************************************************/
+/*****************************************************************************
+ * software product ID entry/exit
+ *****************************************************************************/
+static void FlashProductIdMode (
+	volatile FLASH_WORD_SIZE *b,
+	int on_off)
+{
+	b[0x5555] = 0xaa;
+	b[0x2aaa] = 0x55;
+	b[0x5555] = on_off ? 0x90 : 0xf0;
+}
+
+/*****************************************************************************
+ * sector erase start
+ *****************************************************************************/
+static void FlashSectorErase (
+	volatile FLASH_WORD_SIZE *b,
+	volatile FLASH_WORD_SIZE *a)
+{
+	b[0x5555] = 0xaa;
+	b[0x2aaa] = 0x55;
+	b[0x5555] = 0x80;
+	b[0x5555] = 0xaa;
+	b[0x2aaa] = 0x55;
+	a[0] = 0x30;
+}
+
+/*****************************************************************************
+ * program a word
+ *****************************************************************************/
+static void FlashProgWord (
+	volatile FLASH_WORD_SIZE *b,
+	volatile FLASH_WORD_SIZE *a,
+	FLASH_WORD_SIZE v)
+{
+	b[0x5555] = 0xaa;
+	b[0x2aaa] = 0x55;
+	b[0x5555] = 0xa0;
+	a[0] = v;
+}
+
+/*****************************************************************************
+ * reset bank, back to read mode
+ *****************************************************************************/
+static void FlashReset (volatile FLASH_WORD_SIZE *b)
+{
+	b[0] = 0xf0;
+}
+
+/*****************************************************************************
+ * identify FLASH chip
+ * this code is a stripped version of the FlashGetType() function in EMKstax
+ *****************************************************************************/
 unsigned long flash_init (void)
-{
-	volatile FLASH_WORD_SIZE * const flash = (volatile FLASH_WORD_SIZE *) CFG_FLASH_BASE;
-	FLASH_WORD_SIZE	manu, dev;
-	flash_info_t * const pflinfo = &flash_info[0];
-	int j;
-
-	/* get Id Bytes */
-	FlashProductIdMode (flash, 1);
-	manu = flash[0];
-	dev  = flash[1];
-	FlashProductIdMode (flash, 0);
-
-	pflinfo->size = 0;
-	pflinfo->sector_count = 0;
-	pflinfo->flash_id = 0xffffffff;
-	pflinfo->portwidth = FLASH_CFI_16BIT;
-	pflinfo->chipwidth = FLASH_CFI_BY16;
-
-	switch (manu&0xff)
-	{
-	case 0x01:	/* AMD */
-		pflinfo->flash_id = FLASH_MAN_AMD;
-		switch (dev&0xff)
-		{
-		case 0x49:
-			pflinfo->size = 0x00200000;
-			pflinfo->sector_count = 35;
-			pflinfo->flash_id |= FLASH_AM160B;
-			pflinfo->start[0] = CFG_FLASH_BASE;
-			pflinfo->start[1] = CFG_FLASH_BASE + 0x4000;
-			pflinfo->start[2] = CFG_FLASH_BASE + 0x6000;
-			pflinfo->start[3] = CFG_FLASH_BASE + 0x8000;
-			for (j = 4; j < 35; j++)
-			{
-				pflinfo->start[j] = CFG_FLASH_BASE + 0x00010000 * (j-3);
-			}
-			break;
-
-		case 0xf9:
-			pflinfo->size = 0x00400000;
-			pflinfo->sector_count = 71;
-			pflinfo->flash_id |= FLASH_AM320B;
-			pflinfo->start[0] = CFG_FLASH_BASE;
-			pflinfo->start[1] = CFG_FLASH_BASE + 0x4000;
-			pflinfo->start[2] = CFG_FLASH_BASE + 0x6000;
-			pflinfo->start[3] = CFG_FLASH_BASE + 0x8000;
-			for (j = 0; j < 8; j++)
-			{
-				pflinfo->start[j] = CFG_FLASH_BASE + 0x00002000 * (j);
-			}
-			for (j = 8; j < 71; j++)
-			{
-				pflinfo->start[j] = CFG_FLASH_BASE + 0x00010000 * (j-7);
-			}
-			break;
-
-		default:
-			printf ("unknown AMD dev=%x ", dev);
-			pflinfo->flash_id |= FLASH_UNKNOWN;
-		}
-		break;
-
-	default:
-		printf ("unknown manu=%x ", manu);
-	}
-	return pflinfo->size;
+{
+	volatile FLASH_WORD_SIZE * const flash = (volatile FLASH_WORD_SIZE *) CFG_FLASH_BASE;
+	FLASH_WORD_SIZE	manu, dev;
+	flash_info_t * const pflinfo = &flash_info[0];
+	int j;
+
+	/* get Id Bytes */
+	FlashProductIdMode (flash, 1);
+	manu = flash[0];
+	dev  = flash[1];
+	FlashProductIdMode (flash, 0);
+
+	pflinfo->size = 0;
+	pflinfo->sector_count = 0;
+	pflinfo->flash_id = 0xffffffff;
+	pflinfo->portwidth = FLASH_CFI_16BIT;
+	pflinfo->chipwidth = FLASH_CFI_BY16;
+
+	switch (manu&0xff)
+	{
+	case 0x01:	/* AMD */
+		pflinfo->flash_id = FLASH_MAN_AMD;
+		switch (dev&0xff)
+		{
+		case 0x49:
+			pflinfo->size = 0x00200000;
+			pflinfo->sector_count = 35;
+			pflinfo->flash_id |= FLASH_AM160B;
+			pflinfo->start[0] = CFG_FLASH_BASE;
+			pflinfo->start[1] = CFG_FLASH_BASE + 0x4000;
+			pflinfo->start[2] = CFG_FLASH_BASE + 0x6000;
+			pflinfo->start[3] = CFG_FLASH_BASE + 0x8000;
+			for (j = 4; j < 35; j++)
+			{
+				pflinfo->start[j] = CFG_FLASH_BASE + 0x00010000 * (j-3);
+			}
+			break;
+
+		case 0xf9:
+			pflinfo->size = 0x00400000;
+			pflinfo->sector_count = 71;
+			pflinfo->flash_id |= FLASH_AM320B;
+			pflinfo->start[0] = CFG_FLASH_BASE;
+			pflinfo->start[1] = CFG_FLASH_BASE + 0x4000;
+			pflinfo->start[2] = CFG_FLASH_BASE + 0x6000;
+			pflinfo->start[3] = CFG_FLASH_BASE + 0x8000;
+			for (j = 0; j < 8; j++)
+			{
+				pflinfo->start[j] = CFG_FLASH_BASE + 0x00002000 * (j);
+			}
+			for (j = 8; j < 71; j++)
+			{
+				pflinfo->start[j] = CFG_FLASH_BASE + 0x00010000 * (j-7);
+			}
+			break;
+
+		default:
+			printf ("unknown AMD dev=%x ", dev);
+			pflinfo->flash_id |= FLASH_UNKNOWN;
+		}
+		break;
+
+	default:
+		printf ("unknown manu=%x ", manu);
+	}
+	return pflinfo->size;
 }
 
-/*****************************************************************************
- * print info about a FLASH
- *****************************************************************************/
+/*****************************************************************************
+ * print info about a FLASH
+ *****************************************************************************/
 void flash_print_info (flash_info_t *info)
-{
-	static const char	unk[] = "Unknown";
-	unsigned int		i;
-	const char			*mfct=unk,
-						*type=unk;
-
-	if(info->flash_id != FLASH_UNKNOWN)
-	{
-		switch (info->flash_id & FLASH_VENDMASK)
-		{
-		case FLASH_MAN_AMD:
-			mfct = "AMD";
-			break;
-		}
-
-		switch (info->flash_id & FLASH_TYPEMASK)
-		{
-		case FLASH_AM160B:
-			type = "AM29LV160B (16 Mbit, bottom boot sect)";
-			break;
-		case FLASH_AM320B:
-			type = "AM29LV320B (32 Mbit, bottom boot sect)";
-			break;
-		}
-	}
-
-	printf (
-		"\n  Brand: %s Type: %s\n"
-		"  Size: %lu KB in %d Sectors\n",
-		mfct,
-		type,
-		info->size >> 10,
-		info->sector_count
-		);
-
-	printf ("  Sector Start Addresses:");
-
-	for (i = 0; i < info->sector_count; i++)
-	{
-		unsigned long	size;
-		unsigned int	erased;
-		unsigned long	*flash = (unsigned long *) info->start[i];
-
-		/*
-		 * Check if whole sector is erased
-		 */
-		size =
-			(i != (info->sector_count - 1)) ?
-			(info->start[i + 1] - info->start[i]) >> 2 :
-		(info->start[0] + info->size - info->start[i]) >> 2;
-
-		for (
-			flash = (unsigned long *) info->start[i], erased = 1;
-				(flash != (unsigned long *) info->start[i] + size) && erased;
-					flash++
-			)
-			erased = *flash == ~0x0UL;
-
-		printf (
-			"%s %08lX %s %s",
-			(i % 5) ? "" : "\n   ",
-			info->start[i],
-			erased ? "E" : " ",
-			info->protect[i] ? "RO" : "  "
-			);
-	}
-
-	puts ("\n");
-	return;
+{
+	static const char	unk[] = "Unknown";
+	unsigned int		i;
+	const char			*mfct=unk,
+						*type=unk;
+
+	if(info->flash_id != FLASH_UNKNOWN)
+	{
+		switch (info->flash_id & FLASH_VENDMASK)
+		{
+		case FLASH_MAN_AMD:
+			mfct = "AMD";
+			break;
+		}
+
+		switch (info->flash_id & FLASH_TYPEMASK)
+		{
+		case FLASH_AM160B:
+			type = "AM29LV160B (16 Mbit, bottom boot sect)";
+			break;
+		case FLASH_AM320B:
+			type = "AM29LV320B (32 Mbit, bottom boot sect)";
+			break;
+		}
+	}
+
+	printf (
+		"\n  Brand: %s Type: %s\n"
+		"  Size: %lu KB in %d Sectors\n",
+		mfct,
+		type,
+		info->size >> 10,
+		info->sector_count
+		);
+
+	printf ("  Sector Start Addresses:");
+
+	for (i = 0; i < info->sector_count; i++)
+	{
+		unsigned long	size;
+		unsigned int	erased;
+		unsigned long	*flash = (unsigned long *) info->start[i];
+
+		/*
+		 * Check if whole sector is erased
+		 */
+		size =
+			(i != (info->sector_count - 1)) ?
+			(info->start[i + 1] - info->start[i]) >> 2 :
+		(info->start[0] + info->size - info->start[i]) >> 2;
+
+		for (
+			flash = (unsigned long *) info->start[i], erased = 1;
+				(flash != (unsigned long *) info->start[i] + size) && erased;
+					flash++
+			)
+			erased = *flash == ~0x0UL;
+
+		printf (
+			"%s %08lX %s %s",
+			(i % 5) ? "" : "\n   ",
+			info->start[i],
+			erased ? "E" : " ",
+			info->protect[i] ? "RO" : "  "
+			);
+	}
+
+	puts ("\n");
+	return;
 }
 
-/*****************************************************************************
- * erase one or more sectors
- *****************************************************************************/
+/*****************************************************************************
+ * erase one or more sectors
+ *****************************************************************************/
 int	flash_erase (flash_info_t *info, int s_first, int s_last)
-{
-	volatile FLASH_WORD_SIZE	*addr = (FLASH_WORD_SIZE *)(info->start[0]);
-	int							flag,
-								prot,
-								sect,
-								l_sect;
-	ulong						start,
-								now,
-								last;
-
-	if ((s_first < 0) || (s_first > s_last))
-	{
-		if (info->flash_id == FLASH_UNKNOWN)
-		{
-			printf ("- missing\n");
-		}
-		else
-		{
-			printf ("- no sectors to erase\n");
-		}
-		return 1;
-	}
-
-	if ((info->flash_id == FLASH_UNKNOWN) ||
-		(info->flash_id > (FLASH_MAN_STM | FLASH_AMD_COMP)))
-	{
-		printf ("Can't erase unknown flash type - aborted\n");
-		return 1;
-	}
-
-	prot = 0;
-	for (sect=s_first; sect<=s_last; ++sect)
-	{
-		if (info->protect[sect])
-		{
-			prot++;
-		}
-	}
-
-	if (prot)
-	{
-		printf ("- Warning: %d protected sectors will not be erased!\n",
-			prot);
-	}
-	else
-	{
-		printf ("\n");
-	}
-
-	l_sect = -1;
-
-	/* Disable interrupts which might cause a timeout here */
-	flag = disable_interrupts();
-
-	/* Start erase on unprotected sectors */
-	for (sect = s_first; sect<=s_last; sect++)
-	{
-		if (info->protect[sect] == 0)
-		{ /* not protected */
-			FlashSectorErase ((FLASH_WORD_SIZE *)info->start[0], (FLASH_WORD_SIZE *)info->start[sect]);
-			l_sect = sect;
-		}
-	}
-
-	/* re-enable interrupts if necessary */
-	if (flag)
-		enable_interrupts();
-
-	/* wait at least 80us - let's wait 1 ms */
-	udelay (1000);
-
-	/*
-	* We wait for the last triggered sector
-	*/
-	if (l_sect < 0)
-		goto DONE;
-
-	start = get_timer (0);
-	last  = start;
-	addr = (FLASH_WORD_SIZE *)info->start[l_sect];
-	while ((addr[0] & 0x0080) != 0x0080)
-	{
-		if ((now = get_timer (start)) > CFG_FLASH_ERASE_TOUT)
-		{
-			printf ("Timeout\n");
-			return 1;
-		}
-		/* show that we're waiting */
-		if ((now - last) > 1000)
-		{  /* every second */
-			serial_putc ('.');
-			last = now;
-		}
-	}
-
-	DONE:
-	/* reset to read mode */
-	FlashReset ((FLASH_WORD_SIZE *)info->start[0]);
-
-	printf (" done\n");
-	return 0;
+{
+	volatile FLASH_WORD_SIZE	*addr = (FLASH_WORD_SIZE *)(info->start[0]);
+	int							flag,
+								prot,
+								sect,
+								l_sect;
+	ulong						start,
+								now,
+								last;
+
+	if ((s_first < 0) || (s_first > s_last))
+	{
+		if (info->flash_id == FLASH_UNKNOWN)
+		{
+			printf ("- missing\n");
+		}
+		else
+		{
+			printf ("- no sectors to erase\n");
+		}
+		return 1;
+	}
+
+	if ((info->flash_id == FLASH_UNKNOWN) ||
+		(info->flash_id > (FLASH_MAN_STM | FLASH_AMD_COMP)))
+	{
+		printf ("Can't erase unknown flash type - aborted\n");
+		return 1;
+	}
+
+	prot = 0;
+	for (sect=s_first; sect<=s_last; ++sect)
+	{
+		if (info->protect[sect])
+		{
+			prot++;
+		}
+	}
+
+	if (prot)
+	{
+		printf ("- Warning: %d protected sectors will not be erased!\n",
+			prot);
+	}
+	else
+	{
+		printf ("\n");
+	}
+
+	l_sect = -1;
+
+	/* Disable interrupts which might cause a timeout here */
+	flag = disable_interrupts();
+
+	/* Start erase on unprotected sectors */
+	for (sect = s_first; sect<=s_last; sect++)
+	{
+		if (info->protect[sect] == 0)
+		{ /* not protected */
+			FlashSectorErase ((FLASH_WORD_SIZE *)info->start[0], (FLASH_WORD_SIZE *)info->start[sect]);
+			l_sect = sect;
+		}
+	}
+
+	/* re-enable interrupts if necessary */
+	if (flag)
+		enable_interrupts();
+
+	/* wait at least 80us - let's wait 1 ms */
+	udelay (1000);
+
+	/*
+	* We wait for the last triggered sector
+	*/
+	if (l_sect < 0)
+		goto DONE;
+
+	start = get_timer (0);
+	last  = start;
+	addr = (FLASH_WORD_SIZE *)info->start[l_sect];
+	while ((addr[0] & 0x0080) != 0x0080)
+	{
+		if ((now = get_timer (start)) > CFG_FLASH_ERASE_TOUT)
+		{
+			printf ("Timeout\n");
+			return 1;
+		}
+		/* show that we're waiting */
+		if ((now - last) > 1000)
+		{  /* every second */
+			serial_putc ('.');
+			last = now;
+		}
+	}
+
+	DONE:
+	/* reset to read mode */
+	FlashReset ((FLASH_WORD_SIZE *)info->start[0]);
+
+	printf (" done\n");
+	return 0;
 }
 
-/*****************************************************************************
+/*****************************************************************************
  * Copy memory to flash, returns:
  * 0 - OK
  * 1 - write timeout
  * 2 - Flash not erased
- *****************************************************************************/
+ *****************************************************************************/
 int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
-{
-	ulong		cp,
-				wp,
-				data;
-	int			i,
-				l,
-				rc;
-
-	wp = (addr & ~(FLASH_WORD_WIDTH-1));   /* get lower word aligned address */
-
-	/*
-	 * handle unaligned start bytes, if there are...
-	 */
-	if ((l = addr - wp) != 0)
-	{
-		data = 0;
-		
-		/* get the current before the new data into our data word */
-		for (i=0, cp=wp; i<l; ++i, ++cp)
-		{
-			data = (data << 8) | (*(uchar *)cp);
-		}
-		
-		/* now merge the to be programmed values */
-		for (; i<4 && cnt>0; ++i, ++cp, --cnt)
-		{
-			data = (data << 8) | *src++;
-		}
-
-		/* get the current after the new data into our data word */
-		for (; cnt==0 && i<FLASH_WORD_WIDTH; ++i, ++cp)
-		{
-			data = (data << 8) | (*(uchar *)cp);
-		}
-
-		/* now write the combined word */
-		if ((rc = write_word (info, wp, data)) != 0)
-		{
-			return (rc);
-		}
-		wp += FLASH_WORD_WIDTH;
-	}
-
-	/*
-	 * handle word aligned part
-	 */
-	while (cnt >= FLASH_WORD_WIDTH)
-	{
-		data = 0;
-		for (i=0; i<FLASH_WORD_WIDTH; ++i)
-		{
-			data = (data << 8) | *src++;
-		}
-		if ((rc = write_word (info, wp, data)) != 0)
-		{
-			return (rc);
-		}
-		wp  += FLASH_WORD_WIDTH;
-		cnt -= FLASH_WORD_WIDTH;
-	}
-
-	if (cnt == 0)
-	{
-		return (0);
-	}
-
-	/*
-	 * handle unaligned tail bytes, if there are...
-	 */
-	data = 0;
-
-	/* now merge the to be programmed values */
-	for (i=0, cp=wp; i<FLASH_WORD_WIDTH && cnt>0; ++i, ++cp)
-	{
-		data = (data << 8) | *src++;
-		--cnt;
-	}
-
-	/* get the current after the new data into our data word */
-	for (; i<FLASH_WORD_WIDTH; ++i, ++cp)
-	{
-		data = (data << 8) | (*(uchar *)cp);
-	}
-
-	/* now write the combined word */
-	return (write_word (info, wp, data));
+{
+	ulong		cp,
+				wp,
+				data;
+	int			i,
+				l,
+				rc;
+
+	wp = (addr & ~(FLASH_WORD_WIDTH-1));   /* get lower word aligned address */
+
+	/*
+	 * handle unaligned start bytes, if there are...
+	 */
+	if ((l = addr - wp) != 0)
+	{
+		data = 0;
+
+		/* get the current before the new data into our data word */
+		for (i=0, cp=wp; i<l; ++i, ++cp)
+		{
+			data = (data << 8) | (*(uchar *)cp);
+		}
+
+		/* now merge the to be programmed values */
+		for (; i<4 && cnt>0; ++i, ++cp, --cnt)
+		{
+			data = (data << 8) | *src++;
+		}
+
+		/* get the current after the new data into our data word */
+		for (; cnt==0 && i<FLASH_WORD_WIDTH; ++i, ++cp)
+		{
+			data = (data << 8) | (*(uchar *)cp);
+		}
+
+		/* now write the combined word */
+		if ((rc = write_word (info, wp, data)) != 0)
+		{
+			return (rc);
+		}
+		wp += FLASH_WORD_WIDTH;
+	}
+
+	/*
+	 * handle word aligned part
+	 */
+	while (cnt >= FLASH_WORD_WIDTH)
+	{
+		data = 0;
+		for (i=0; i<FLASH_WORD_WIDTH; ++i)
+		{
+			data = (data << 8) | *src++;
+		}
+		if ((rc = write_word (info, wp, data)) != 0)
+		{
+			return (rc);
+		}
+		wp  += FLASH_WORD_WIDTH;
+		cnt -= FLASH_WORD_WIDTH;
+	}
+
+	if (cnt == 0)
+	{
+		return (0);
+	}
+
+	/*
+	 * handle unaligned tail bytes, if there are...
+	 */
+	data = 0;
+
+	/* now merge the to be programmed values */
+	for (i=0, cp=wp; i<FLASH_WORD_WIDTH && cnt>0; ++i, ++cp)
+	{
+		data = (data << 8) | *src++;
+		--cnt;
+	}
+
+	/* get the current after the new data into our data word */
+	for (; i<FLASH_WORD_WIDTH; ++i, ++cp)
+	{
+		data = (data << 8) | (*(uchar *)cp);
+	}
+
+	/* now write the combined word */
+	return (write_word (info, wp, data));
 }
 
-/*****************************************************************************
+/*****************************************************************************
  * Write a word to Flash, returns:
  * 0 - OK
  * 1 - write timeout
  * 2 - Flash not erased
- *****************************************************************************/
+ *****************************************************************************/
 static int write_word (flash_info_t *info, ulong dest, ulong data)
-{
-	volatile FLASH_WORD_SIZE	*addr2 = (FLASH_WORD_SIZE *)info->start[0];
-	volatile FLASH_WORD_SIZE	*dest2 = (FLASH_WORD_SIZE *)dest;
-	FLASH_WORD_SIZE				data2 = data;
-	ulong						start;
-	int							flag;
-
-	/* Check if Flash is (sufficiently) erased */
-	if ((*dest2 & data2) != data2)
-	{
-		return (2);
-	}
-	
-	/* Disable interrupts which might cause a timeout here */
-	flag = disable_interrupts ();
-
-	FlashProgWord (addr2, dest2, data2);
-
-	/* re-enable interrupts if necessary */
-	if (flag)
-		enable_interrupts ();
-
-	/* data polling for D7 */
-	start = get_timer (0);
-	while ((*dest2 & 0x0080) != (data2 & 0x0080))
-	{
-		if (get_timer (start) > CFG_FLASH_WRITE_TOUT)
-		{
-			return (1);
-		}
-	}
-
-	return (0);
+{
+	volatile FLASH_WORD_SIZE	*addr2 = (FLASH_WORD_SIZE *)info->start[0];
+	volatile FLASH_WORD_SIZE	*dest2 = (FLASH_WORD_SIZE *)dest;
+	FLASH_WORD_SIZE				data2 = data;
+	ulong						start;
+	int							flag;
+
+	/* Check if Flash is (sufficiently) erased */
+	if ((*dest2 & data2) != data2)
+	{
+		return (2);
+	}
+
+	/* Disable interrupts which might cause a timeout here */
+	flag = disable_interrupts ();
+
+	FlashProgWord (addr2, dest2, data2);
+
+	/* re-enable interrupts if necessary */
+	if (flag)
+		enable_interrupts ();
+
+	/* data polling for D7 */
+	start = get_timer (0);
+	while ((*dest2 & 0x0080) != (data2 & 0x0080))
+	{
+		if (get_timer (start) > CFG_FLASH_WRITE_TOUT)
+		{
+			return (1);
+		}
+	}
+
+	return (0);
 }
 
 /*-----------------------------------------------------------------------
  */
-
diff --git a/board/emk/top860/top860.c b/board/emk/top860/top860.c
index b99bf0e..d13be98 100644
--- a/board/emk/top860/top860.c
+++ b/board/emk/top860/top860.c
@@ -35,47 +35,47 @@
 #include <commproc.h>
 #include <mpc8xx.h>
 
-/*****************************************************************************
- * UPM table for 60ns EDO RAM at 25 MHz bus/external clock
- *****************************************************************************/
+/*****************************************************************************
+ * UPM table for 60ns EDO RAM at 25 MHz bus/external clock
+ *****************************************************************************/
 static const uint edo_60ns_25MHz_tbl[] = {
-
-/* single read   (offset 0x00 in upm ram) */
-    0x0ff3fc04,0x08f3fc04,0x00f3fc04,0x00f3fc00,
-    0x33f7fc07,0xfffffc05,0xfffffc05,0xfffffc05,
-/* burst read    (offset 0x08 in upm ram) */
-    0x0ff3fc04,0x08f3fc04,0x00f3fc0c,0x0ff3fc40,
-    0x0cf3fc04,0x03f3fc48,0x0cf3fc04,0x03f3fc48,
-    0x0cf3fc04,0x03f3fc00,0x3ff7fc07,0xfffffc05,
-    0xfffffc05,0xfffffc05,0xfffffc05,0xfffffc05,
-/* single write  (offset 0x18 in upm ram) */
-    0x0ffffc04,0x08fffc04,0x30fffc00,0xf1fffc07,
-    0xfffffc05,0xfffffc05,0xfffffc05,0xfffffc05,
-/* burst write   (offset 0x20 in upm ram) */
-    0x0ffffc04,0x08fffc00,0x00fffc04,0x03fffc4c,
-    0x00fffc00,0x07fffc4c,0x00fffc00,0x0ffffc4c,
-    0x00fffc00,0x3ffffc07,0xfffffc05,0xfffffc05,
-    0xfffffc05,0xfffffc05,0xfffffc05,0xfffffc05,
-/* refresh       (offset 0x30 in upm ram) */
-    0xc0fffc04,0x07fffc04,0x0ffffc04,0x0ffffc04,
-    0xfffffc05,0xfffffc05,0xfffffc05,0xfffffc05,
-    0xfffffc05,0xfffffc05,0xfffffc05,0xfffffc05,
-/* exception     (offset 0x3C in upm ram) */
-    0xfffffc07,0xfffffc03,0xfffffc05,0xfffffc05,
+
+/* single read   (offset 0x00 in upm ram) */
+    0x0ff3fc04,0x08f3fc04,0x00f3fc04,0x00f3fc00,
+    0x33f7fc07,0xfffffc05,0xfffffc05,0xfffffc05,
+/* burst read    (offset 0x08 in upm ram) */
+    0x0ff3fc04,0x08f3fc04,0x00f3fc0c,0x0ff3fc40,
+    0x0cf3fc04,0x03f3fc48,0x0cf3fc04,0x03f3fc48,
+    0x0cf3fc04,0x03f3fc00,0x3ff7fc07,0xfffffc05,
+    0xfffffc05,0xfffffc05,0xfffffc05,0xfffffc05,
+/* single write  (offset 0x18 in upm ram) */
+    0x0ffffc04,0x08fffc04,0x30fffc00,0xf1fffc07,
+    0xfffffc05,0xfffffc05,0xfffffc05,0xfffffc05,
+/* burst write   (offset 0x20 in upm ram) */
+    0x0ffffc04,0x08fffc00,0x00fffc04,0x03fffc4c,
+    0x00fffc00,0x07fffc4c,0x00fffc00,0x0ffffc4c,
+    0x00fffc00,0x3ffffc07,0xfffffc05,0xfffffc05,
+    0xfffffc05,0xfffffc05,0xfffffc05,0xfffffc05,
+/* refresh       (offset 0x30 in upm ram) */
+    0xc0fffc04,0x07fffc04,0x0ffffc04,0x0ffffc04,
+    0xfffffc05,0xfffffc05,0xfffffc05,0xfffffc05,
+    0xfffffc05,0xfffffc05,0xfffffc05,0xfffffc05,
+/* exception     (offset 0x3C in upm ram) */
+    0xfffffc07,0xfffffc03,0xfffffc05,0xfffffc05,
 };
 
-/*****************************************************************************
- * Print Board Identity
- *****************************************************************************/
+/*****************************************************************************
+ * Print Board Identity
+ *****************************************************************************/
 int checkboard (void)
 {
 	puts ("Board:"CONFIG_IDENT_STRING"\n");
 	return (0);
 }
 
-/*****************************************************************************
- * Initialize DRAM controller
- *****************************************************************************/
+/*****************************************************************************
+ * Initialize DRAM controller
+ *****************************************************************************/
 long int initdram (int board_type)
 {
 	volatile immap_t *immap = (immap_t *) CFG_IMMR;
@@ -85,103 +85,93 @@
 	 * Only initialize memory controller when running from FLASH.
 	 * When running from RAM, don't touch it.
 	 */
-	if ((ulong) initdram & 0xff000000)
-	{
-		volatile uint	*addr1, *addr2;
-		uint			i, j;
+	if ((ulong) initdram & 0xff000000) {
+		volatile uint *addr1, *addr2;
+		uint i, j;
 
-		upmconfig (UPMA, (uint *) edo_60ns_25MHz_tbl,
-			sizeof (edo_60ns_25MHz_tbl) / sizeof (uint));
+		upmconfig (UPMA, (uint *) edo_60ns_25MHz_tbl,
+			   sizeof (edo_60ns_25MHz_tbl) / sizeof (uint));
 		memctl->memc_mptpr = 0x0200;
 		memctl->memc_mamr = 0x0ca20330;
 		memctl->memc_or2 = -CFG_DRAM_MAX | OR_CSNT_SAM;
 		memctl->memc_br2 = CFG_DRAM_BASE | BR_MS_UPMA | BR_V;
-		/*
-		 * Do 8 read accesses to DRAM
-		 */
-		addr1 = (volatile uint*) 0;
-		addr2 = (volatile uint*) 0x00400000;
-		for (i=0, j=0; i<8; i++)
-			j = addr1[0];
-		
-		/*
-		 * Now check whether we got 4MB or 16MB populated
-		 */
-		addr1[0] = 0x12345678;
-		addr1[1] = 0x9abcdef0;
-		addr2[0] = 0xfeedc0de;
-		addr2[1] = 0x47110815;
-		if (addr1[0] == 0xfeedc0de && addr1[1] == 0x47110815)
-		{
-			/* only 4MB populated */
-			memctl->memc_or2 = -(CFG_DRAM_MAX/4) | OR_CSNT_SAM;
-		}
-	}
-
+		/*
+		 * Do 8 read accesses to DRAM
+		 */
+		addr1 = (volatile uint *) 0;
+		addr2 = (volatile uint *) 0x00400000;
+		for (i = 0, j = 0; i < 8; i++)
+			j = addr1[0];
+
+		/*
+		 * Now check whether we got 4MB or 16MB populated
+		 */
+		addr1[0] = 0x12345678;
+		addr1[1] = 0x9abcdef0;
+		addr2[0] = 0xfeedc0de;
+		addr2[1] = 0x47110815;
+		if (addr1[0] == 0xfeedc0de && addr1[1] == 0x47110815) {
+			/* only 4MB populated */
+			memctl->memc_or2 = -(CFG_DRAM_MAX / 4) | OR_CSNT_SAM;
+		}
+	}
+
 	return -(memctl->memc_or2 & 0xffff0000);
 }
-
-/*****************************************************************************
- * otherinits after RAM is there and we are relocated to RAM
- * note: though this is an int function, nobody cares for the result!
- *****************************************************************************/
+
+/*****************************************************************************
+ * otherinits after RAM is there and we are relocated to RAM
+ * note: though this is an int function, nobody cares for the result!
+ *****************************************************************************/
 int misc_init_r (void)
-{
-	/* read 'factory' part of EEPROM */
-	uchar				buf[81];
-	uchar				*p;
-	uint				length;
-	uint				addr;
-	uint				len;
-
-	/* get length first */
-	addr = CFG_FACT_OFFSET;
-	if (eeprom_read (CFG_I2C_FACT_ADDR, addr, buf, 2))
-	{
-bailout:
-		printf ("cannot read factory configuration\n");
-		printf ("be sure to set ethaddr	yourself!\n");
-		return 0;
+{
+	/* read 'factory' part of EEPROM */
+	uchar buf[81];
+	uchar *p;
+	uint length;
+	uint addr;
+	uint len;
+
+	/* get length first */
+	addr = CFG_FACT_OFFSET;
+	if (eeprom_read (CFG_I2C_FACT_ADDR, addr, buf, 2)) {
+	  bailout:
+		printf ("cannot read factory configuration\n");
+		printf ("be sure to set ethaddr	yourself!\n");
+		return 0;
 	}
-	length = buf[0] + (buf[1]<<8);
-	addr += 2;
-
-	/* sanity check */
-	if (length < 20 || length > CFG_FACT_SIZE-2)
-		goto bailout;
-
-	/* read lines */
-	while (length > 0)
-	{
-		/* read one line */
-		len = length > 80 ? 80 : length;
-		if (eeprom_read (CFG_I2C_FACT_ADDR, addr, buf, len))
-			goto bailout;
-		/* mark end of buffer */
-		buf[len] = 0;
-		/* search end of line */
-		for (p=buf; *p && *p != 0x0a; p++) ;
-		if (!*p)
-			goto bailout;
-		*p++ = 0;
-		/* advance to next line start */
-		length -= p-buf;
-		addr += p-buf;
-		/*printf ("%s\n", buf);*/
-		/* search for our specific entry */
-		if (!strncmp ((char *)buf, "[RLA/lan/Ethernet] ", 19))
-		{
-			setenv ("ethaddr", buf+19);
-		} 
-		else if (!strncmp ((char *)buf, "[BOARD/SERIAL] ", 15))
-		{
-			setenv ("serial#", buf+15);
-		} 
-		else if (!strncmp ((char *)buf, "[BOARD/TYPE] ", 13))
-		{
-			setenv ("board_id", buf+13);
-		} 
-	}
+	length = buf[0] + (buf[1] << 8);
+	addr += 2;
+
+	/* sanity check */
+	if (length < 20 || length > CFG_FACT_SIZE - 2)
+		goto bailout;
+
+	/* read lines */
+	while (length > 0) {
+		/* read one line */
+		len = length > 80 ? 80 : length;
+		if (eeprom_read (CFG_I2C_FACT_ADDR, addr, buf, len))
+			goto bailout;
+		/* mark end of buffer */
+		buf[len] = 0;
+		/* search end of line */
+		for (p = buf; *p && *p != 0x0a; p++);
+		if (!*p)
+			goto bailout;
+		*p++ = 0;
+		/* advance to next line start */
+		length -= p - buf;
+		addr += p - buf;
+		/*printf ("%s\n", buf); */
+		/* search for our specific entry */
+		if (!strncmp ((char *) buf, "[RLA/lan/Ethernet] ", 19)) {
+			setenv ("ethaddr", buf + 19);
+		} else if (!strncmp ((char *) buf, "[BOARD/SERIAL] ", 15)) {
+			setenv ("serial#", buf + 15);
+		} else if (!strncmp ((char *) buf, "[BOARD/TYPE] ", 13)) {
+			setenv ("board_id", buf + 13);
+		}
+	}
 	return (0);
 }
-
diff --git a/board/emk/top860/u-boot.lds b/board/emk/top860/u-boot.lds
index 6371110..f6f5485 100644
--- a/board/emk/top860/u-boot.lds
+++ b/board/emk/top860/u-boot.lds
@@ -98,6 +98,12 @@
   _edata  =  .;
   PROVIDE (edata = .);
 
+
+  __u_boot_cmd_start = .;
+  .u_boot_cmd : { *(.u_boot_cmd) }
+  __u_boot_cmd_end = .;
+
+
   __start___ex_table = .;
   __ex_table : { *(__ex_table) }
   __stop___ex_table = .;
@@ -120,4 +126,3 @@
   _end = . ;
   PROVIDE (end = .);
 }
-
diff --git a/board/emk/top860/u-boot.lds.debug b/board/emk/top860/u-boot.lds.debug
index bd13b7b..8d91be5 100644
--- a/board/emk/top860/u-boot.lds.debug
+++ b/board/emk/top860/u-boot.lds.debug
@@ -129,4 +129,3 @@
   _end = . ;
   PROVIDE (end = .);
 }
-
